import { ApiProperty } from '@nestjs/swagger';
import { isEmpty, IsNotEmpty, MaxLength, MinLength } from 'class-validator';

export class UserCreateDto {
  @IsNotEmpty({ message: 'username can not be empty' })
  @ApiProperty()
  username: string;

  @ApiProperty()
  @IsNotEmpty({ message: 'password can not be empty' })
  @MinLength(3, { message: 'password can not be less than 8' })
  password: string;
}
